
/**
 *  数据字典下拉公共方法
 */
export function dealDict(dict) {
  var dictObject = {}
  Object.keys(dict).forEach((name) => {
    const arrayName = name + 'Types'
    const objectArray = {}
    objectArray[arrayName] = []
    const dictObj = dict[name]
    Object.keys(dictObj).forEach(key => {
      const objVal = dictObj[key + '']
      const object = {}
      object['key'] = key + ''
      object['value'] = objVal
      objectArray[arrayName].push(object)
    })
    dictObject[arrayName] = objectArray[arrayName]
  })
  return dictObject
}

